package login

import (
	"3-27zk/common/proto/user"
	"3-27zk/service/server"
	"context"
)

type UserSever struct {
	user.UnimplementedUserServer
}

func (s UserSever) SendSms(ctx context.Context, req *user.SendSmsReq) (*user.SendSmsResp, error) {
	sms, err := server.SendSms(req)
	if err != nil {
		return nil, err
	}
	return sms, nil
}

func (s UserSever) Login(ctx context.Context, req *user.LoginReq) (*user.LoginResp, error) {
	login, err := server.Login(req)
	if err != nil {
		return nil, err
	}
	return login, nil
}
func (s UserSever) OrderAdd(ctx context.Context, req *user.OrderAddReq) (*user.OrderAddResp, error) {
	login, err := server.OrderAdd(req)
	if err != nil {
		return nil, err
	}
	return login, nil
}
func (s UserSever) OrderList(ctx context.Context, req *user.OrderListReq) (*user.OrderListResp, error) {
	login, err := server.OrderList(req)
	if err != nil {
		return nil, err
	}
	return login, nil
}
